﻿<%@ Control Language="C#" ClassName="Footer" %>

<script type="text/javascript">

  function ShowMemberPopup(tabType) {
    var LoginID = $("[id*='lbl_username']").text();
    var LoginType = $("[id*='lbl_authType']").val();
    //如果已經登入為會員(企業會員查詢訂單不能直接導向)
    if (LoginID != "" && (LoginType == "1")) {
      window.location.href = "<%= Page.ResolveUrl("~/Accounts/Account.aspx?ActiveTab=")%>" + tabType;
    }
    else {
      lightbox($(".popup-content-account .member-lightbox").prop('outerHTML'));
      if ($.cookie("RememberMemberID") != undefined && $.cookie("RememberMemberID").length > 0) {
        $(".lightbox #tbUserName").val($.cookie("RememberMemberID"));
      }
    }
  }

  //會員 
  function AccountMemberAuthenticate() {
    var userID = $(".lightbox #tbUserName").val();
    var userPW = $(".lightbox #tbPwd").val();
    var RememberMe = $('.lightbox #cbRememberMe').is(':checked');
    if (RememberMe) {
      $.cookie("RememberMemberID", userID, { path: "/", expires: 5 });
    }
    else {
      $.removeCookie("RememberMemberID", { path: "/", expires: 5 });
    }
    Authenticate(userID, userPW, RememberMe, "1", "account");
  }

  //企業優惠訂單查詢
  function AccountEnterpriseAuthenticate() {
    var OrderID = $(".lightbox #tbEnterpriseOrderID").val();
    var OrderName = $(".lightbox #tbEnterpriseOrderName").val();
    if (OrderID.length == 0 || OrderName.length == 0) {
      alert('請輸入訂單號碼及訂購人姓名');
      return false;
    }
    $.cookie('AccOrderID', OrderID, { path: "/" });
    $.cookie('AccCustName', OrderName, { path: "/" });
    $.cookie('jqc_AuthType', '2', { path: "/" });
    lightboxClose();
    window.location.href = "<%= Page.ResolveUrl("~/Accounts/Account.aspx?ActiveTab=1")%>";
  }

  //非會員 
  function AccountNonMemberAuthenticate() {
    var OrderID = $(".lightbox #tbNonMemberOrderID").val();
    var OrderName = $(".lightbox #tbNonMemberOrderName").val();
    var UserID = $(".lightbox #tbNonUserID").val();
    var NonMemberOrder = $("[id*='cbNonMemberOrder']").is(':checked');
    var NonMemberECoupon = $("[id*='cbNonMemberECoupon']").is(':checked');
    var ActiveTab = "1";
    //驗證查詢輸入條件
    if (NonMemberOrder == true && NonMemberECoupon == true) {
      if (OrderID.length == 0 || OrderName.length == 0 || UserID.length == 0) {
        alert("您要查詢訂單及E-Coupon，請輸入訂單號碼、訂購人姓名及身份證字號!!");
        return false;
      }
      ActiveTab = "4";
    }
    else if (NonMemberOrder == true && NonMemberECoupon == false) {
      if (OrderID.length == 0 || OrderName.length == 0) {
        alert("您要查詢訂單，請輸入訂單號碼及訂購人姓名!!");
        return false;
      }
    }
    else if (NonMemberOrder == false && NonMemberECoupon == true) {
      if (UserID.length == 0) {
        alert("您要查詢E-Coupon，請輸入身份證字號!!");
        return false;
      }
      ActiveTab = "2";
    }
    else {
      alert("請選擇及輸入您要查詢的資料!!");
      return false;
    }
    $.cookie('AccOrderID', OrderID, { path: "/" });
    $.cookie('AccCustName', OrderName, { path: "/" });
    //有輸入身份證
    if (UserID.length > 0) {
      //驗證身分證資料 2013/12/17
      if (CheckTWID(UserID) == false) {
        alert('請輸入正確的身分證字號!');
        return false;
      }
      Authenticate(UserID.toUpperCase(), UserID.toUpperCase(), false, "3", "account", ActiveTab);
    }
    else {
      $.cookie('jqc_AuthType', '3', { path: "/" });
      lightboxClose();
      window.location.href = "<%= Page.ResolveUrl("~/Accounts/Account.aspx?ActiveTab=")%>" + ActiveTab;
        }
      }

</script>

<!-- Footer -->
<div class="footer">
  <div class="footer-links">
    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/ContactUs.aspx">與我聯絡</asp:HyperLink>
    | 
        <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/AboutUs.aspx">關於我們</asp:HyperLink>
    | 
        <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/FAQ.aspx">FAQ</asp:HyperLink>
    | 
        <a href="#" class="Nolie">反詐騙</a>
    | 
        <asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="https://myb2b.evaair.com/smasb2b/default.aspx?Language=zh-tw" Target="_blank">廠商合作</asp:HyperLink>
    | 
        <asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="javascript:ShowMemberPopup('2');">E-Coupon</asp:HyperLink>
    | 
        <asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="javascript:ShowMemberPopup('3');">哩程查詢</asp:HyperLink>
    | 
        <asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="javascript:ShowMemberPopup('1');">訂單查詢</asp:HyperLink>
    | 
        <asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl="~/Privacy.aspx">隱私保護及安全聲明</asp:HyperLink>
    | 
        <asp:HyperLink ID="HyperLink10" runat="server" NavigateUrl="~/PropertyRights.aspx">智慧財產權</asp:HyperLink>
    | 
  </div>
  <div class="footer-bottom">
    <div class="footer-right">
      <a href="http://www.evaair.com"  target="_blank">
        <img src="~/Images/Logos/EvaLogo.png" id="EvaLogo" alt="EVA" runat="server" />
      </a>
      <a href="http://eservice.evaair.com/preorder/default.aspx"  target="_blank">
        <img src="~/Images/Logos/SkyShopLogo.png" id="SkyShopLogo" alt="SkyShop" runat="server" /></a>
    </div>
    <div class="footer-copy">
        <a href="#">
          <img src="~/Images/Logos/Security.png" id="Security" alt="Security" runat="server" />
        </a>   
       <%-- <script type="text/javascript" >
          //寰宇數位安全認證標章
          var GDHost = (("https:" == document.location.protocol) ? "https://" : "http://");
          document.write(unescape("%3Cscript src='" + GDHost + "seal.ssl.com.tw/gd/gd_seal.js' charset='utf-8' type='text/javascript'%3E%3C/script%3E"));
          </script>
          <script type="text/javascript">
            trustseal("", "", "vgif", "m", "CEOV1207205198", true, true, "", "");
          </script>--%>
        <a href="http://www.einvoice.nat.gov.tw/wSite/mp" target="_blank">
          <img src="~/Images/Logos/Invoice.png" id="Invoice" alt="Invoice" runat="server" />
        </a>
      <span>Copyright and Disclaimer © EVA Airways Corp</span>
    </div>
  </div>

  <div style="display: none" class="popup-content">
    <div class="message-165">
      <div class="notice">
        <h4>提醒您！
                    <br />
          我們不會無故主動致電顧客，要求更改結帳方式、或詢問個人資料，
更不會要求操作ATM，若您接到可疑電話，請直接撥打<span class="orange-text">反詐騙專線
165</span>通報，或聯絡我們的<span class="orange-text">客服專線：0800-535-678</span></h4>
        <h4>感謝您。<br />
          您的所有資料都將受到SSL認證的保護，請安心進行網路下單。
        </h4>
      </div>
      <div class="liner"></div>
      <div class="links">
        <a href="#" class="btn cancelbtn">確定</a>
      </div>
    </div>
  </div>
</div>

<div style="display: none" class="popup-content-account">
  <div class="member-lightbox">
    <h4>請選擇下列其一方式查詢</h4>
    <div class="liner dotted"></div>
    <div class="login-links JS-login-links">
      <a class="btn" href="#">會員登入</a>
      <a class="btn" href="#">非會員</a>
      <a class="btn" href="#">企業優惠</a>
    </div>
    <div class="tab-areas">
      <div class="area">
        <table>
          <tr>
            <th>卡號 / 別名</th>
            <td>
              <%--<input id="username" type="text" name="name" value="" />--%>
              <asp:TextBox ID="tbUserName" runat="server" ClientIDMode="Static" TabIndex="1"></asp:TextBox>
            </td>
            <td>
              <a href="#" onclick="javascript:window.open('https://eservice.evaair.com/Evaweb/EVA/FFP/membership-number-inquiry.aspx?lang=zh-tw', '_blank');">忘記卡號 / 忘記別名</a>
            </td>
            <td class="v-a-b" rowspan="3">
              <%--<input class="btn fr" onclick="getName()" type="submit" name="name" value="登 入" />--%>
              <asp:Button ID="btnAccountLogin" class="btn fr" runat="server" Text="登 入"
                OnClientClick="AccountMemberAuthenticate(); return false;" TabIndex="4" />
            </td>
          </tr>
          <tr>
            <th>密碼
            </th>
            <td>
              <%--<input id="Mbrpwd" type="password" name="name" value="" />--%>
              <asp:TextBox ID="tbPwd" runat="server" TextMode="Password" ClientIDMode="Static" TabIndex="2"></asp:TextBox>
            </td>
            <td>
              <a href="#" onclick="javascript:window.open('https://eservice.evaair.com/Evaweb/EVA/FFP/forgotten-password.aspx?lang=zh-tw', '_blank');">忘記密碼</a>
            </td>
          </tr>
          <tr>
            <td class="p-bottom" colspan="3">
              <input type="checkbox" name="name" value="" id="cbAccountRememberMe" tabindex="3" />
              記住我的卡號/別名
            </td>
          </tr>
        </table>
      </div>
      <div class="area">
        <table class="shorted">
          <tr>
            <th>
              <%--<input type="checkbox" name="name" value=" " />--%>
              <asp:CheckBox ID="cbNonMemberOrder" runat="server" Text="查詢訂單" />
            </th>
            <th colspan="3">
              <%--<input type="checkbox" name="name" value=" " />--%>
              <asp:CheckBox ID="cbNonMemberECoupon" runat="server" Text="E-Coupon查詢" />
            </th>
          </tr>
        </table>
        <table>
          <tr>
            <th>訂單號碼</th>
            <td>
              <%--<input type="text" name="name" value=" " />--%>
              <asp:TextBox ID="tbNonMemberOrderID" runat="server" ClientIDMode="Static"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <th>訂購人姓名</th>
            <td>
              <%--<input type="text" name="name" value=" " />--%>
              <asp:TextBox ID="tbNonMemberOrderName" runat="server" ClientIDMode="Static"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <th>身份證字號</th>
            <td>
              <%--<input type="text" name="name" value=" " />--%>
              <asp:TextBox ID="tbNonUserID" runat="server" ClientIDMode="Static" MaxLength="10"></asp:TextBox>
            </td>
          </tr>
        </table>
        <div class="info fl">
          <h5>邀您加入無限萬哩遊</h5>
          <p>
            您尚未加入會員嗎? 
          </p>
          <p>請<a href="#" class="orange-text" onclick="javascript:window.open('https://eservice.evaair.com/evaweb/eva/ffp/register-now.aspx?lang=zh-tw', '_blank');">點選此</a>立即加入貴賓行列</p>
        </div>
        <asp:Button ID="btnAccountNonMember" class="btn fr" runat="server" Text="確 定" OnClientClick="AccountNonMemberAuthenticate(); return false;" />
      </div>
      <div class="area">
        <table>
          <tr>
            <th>訂單號碼</th>
            <td>
              <asp:TextBox ID="tbEnterpriseOrderID" runat="server" ClientIDMode="Static" TabIndex="1"></asp:TextBox>
            </td>

            <td class="v-a-b" rowspan="3">
              <asp:Button ID="btnAccountEnterprise" class="btn fr" runat="server" Text="確 定"
                OnClientClick="AccountEnterpriseAuthenticate(); return false;" TabIndex="4" />
            </td>
          </tr>
          <tr>
            <th>訂購人姓名
            </th>
            <td>
              <asp:TextBox ID="tbEnterpriseOrderName" runat="server" ClientIDMode="Static" TabIndex="2"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <th colspan="2">
              <%--<a href="#" class="help" tabindex="3">HELP</a>--%>
            </th>
          </tr>
        </table>
      </div>
    </div>
  </div>
</div>
